<?php
/**
 * This file belongs to huakaili project
 *
 * @author jszhang
 */

$reviewDao = GetReviewDAO();

$supportedType = array( "list", "red", "black" );

$type = GET( "type" );
if( edp_is_empty_string( $type ) || !in_array($type, $supportedType)){
    $type = "list";
}

if($type == "red" || $type == "black")
{	
	if(isset($_GET['gid']))
	{
    	$groupid = intval( GET( "gid" ) );
	}
	else
	{
    	edp_redirect(edp_href_link(PAGENAME_REVIEW_RANK));
	}
    
    $reviewRankInfo = $reviewDao->GetReviewRankInfo($groupid);
    if($reviewRankInfo===false)
    {
    	edp_redirect(edp_href_link(PAGENAME_REVIEW_RANK));
    }
}
?>
